using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using HomeDms.Properties;
using HomeDMSObjectModel;

namespace HomeDms
{
    public partial class ActionsForm : Form
    {
        private DBHelper _dbHelper;

        internal DBHelper DBHelperProp
        {
            set { _dbHelper = value; }
        }
	
        public ActionsForm()
        {
            InitializeComponent();
        }

        private void DoItButton_Click(object sender, EventArgs e)
        {
            if (NewDocumentRadioButton.Checked)
            {
                Close();
                DocumentForm ndf = new DocumentForm();
                ndf.DBHelperProp = _dbHelper;
                ndf.ShowDialog();
            }
        }

        private void ActionsForm_FormClosing(object sender, FormClosingEventArgs e)
        {
            Settings.Default.Save();
        }
    }
}